import Taro, { Component } from "@tarojs/taro";

function request(url, data, method = "GET") {
  return new Promise((result, reject) => {
    Taro.request({
      url,
      data,
      method,
      header: { Authorization: "APPCODE fcd59917ce024f2a98dc5b703f7e463f" },
      success: result,
      fail: reject
    });
  });
}
module.exports = {
  request
};
